package com.ruoyi.books.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.books.mapper.BooksOutspreadMapper;
import com.ruoyi.books.domain.BooksOutspread;
import com.ruoyi.books.service.IBooksOutspreadService;

/**
 * 非遗文化延伸Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-02
 */
@Service
public class BooksOutspreadServiceImpl implements IBooksOutspreadService 
{
    @Autowired
    private BooksOutspreadMapper booksOutspreadMapper;

    /**
     * 查询非遗文化延伸
     * 
     * @param outspreadId 非遗文化延伸主键
     * @return 非遗文化延伸
     */
    @Override
    public BooksOutspread selectBooksOutspreadByOutspreadId(Long outspreadId)
    {
        return booksOutspreadMapper.selectBooksOutspreadByOutspreadId(outspreadId);
    }

    /**
     * 查询非遗文化延伸列表
     * 
     * @param booksOutspread 非遗文化延伸
     * @return 非遗文化延伸
     */
    @Override
    public List<BooksOutspread> selectBooksOutspreadList(BooksOutspread booksOutspread)
    {
        return booksOutspreadMapper.selectBooksOutspreadList(booksOutspread);
    }

    /**
     * 新增非遗文化延伸
     * 
     * @param booksOutspread 非遗文化延伸
     * @return 结果
     */
    @Override
    public int insertBooksOutspread(BooksOutspread booksOutspread)
    {
        return booksOutspreadMapper.insertBooksOutspread(booksOutspread);
    }

    /**
     * 修改非遗文化延伸
     * 
     * @param booksOutspread 非遗文化延伸
     * @return 结果
     */
    @Override
    public int updateBooksOutspread(BooksOutspread booksOutspread)
    {
        return booksOutspreadMapper.updateBooksOutspread(booksOutspread);
    }

    /**
     * 批量删除非遗文化延伸
     * 
     * @param outspreadIds 需要删除的非遗文化延伸主键
     * @return 结果
     */
    @Override
    public int deleteBooksOutspreadByOutspreadIds(Long[] outspreadIds)
    {
        return booksOutspreadMapper.deleteBooksOutspreadByOutspreadIds(outspreadIds);
    }

    /**
     * 删除非遗文化延伸信息
     * 
     * @param outspreadId 非遗文化延伸主键
     * @return 结果
     */
    @Override
    public int deleteBooksOutspreadByOutspreadId(Long outspreadId)
    {
        return booksOutspreadMapper.deleteBooksOutspreadByOutspreadId(outspreadId);
    }
}
